package com.caregiver.watch.business.data.controller;

import com.caregiver.watch.business.data.service.DeviceDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 设备状态变更通知
 */
@Slf4j
@RestController
@RequestMapping("/status")
public class DeviceStatusController {


    @Autowired
    private DeviceDataService deviceService;

    @PostMapping(value = "notify")
    private void deviceStatusChangeNotify(HttpServletRequest req, HttpServletResponse resp) {
        deviceService.deviceStatusChangeNotify(req, resp);
    }
}
